package com.appkubes.mall.restful.application.express.dao;

import com.appkubes.mall.core.dao.BaseMallKdDao;
import com.appkubes.mall.restful.application.express.model.KdResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface KdDao extends BaseMallKdDao {
    @Select({"select a.*, b.name from mall_kd a INNER JOIN mall_kd_company b ON a.ShipperCode=b.sms WHERE a.LogisticCode=#{orderNo} ORDER BY `update_time` DESC LIMIT 1"})
    KdResult findOne(@Param("orderNo") String orderNo);
}
